package com.jeesite.modules.my.entity;

import javax.validation.constraints.Size;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * my_regionsEntity
 * @author ccz
 * @version 2025-03-20
 */
@Table(name="my_regions", alias="a", label="my_regions信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="name", attrName="name", label="name", queryType=QueryType.LIKE),
		@Column(name="parent_id", attrName="parentId", label="parent_id"),
	}, orderBy="a.id DESC"
)
public class MyRegions extends DataEntity<MyRegions> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// name
	private String parentId;		// parent_id

	public MyRegions() {
		this(null);
	}
	
	public MyRegions(String id){
		super(id);
	}
	
	@Size(min=0, max=50, message="name长度不能超过 50 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Size(min=0, max=20, message="parent_id长度不能超过 20 个字符")
	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}
	
}